package com.yanqu.road.server.manager.activity.hsisland.task;

import com.yanqu.road.exception.BusinessException;
import com.yanqu.road.server.manager.activity.hsisland.CrossHsIslandActivity;
import com.yanqu.road.utils.executor.GeneralTask;


/**
 * 海神岛Npc定时任务
 */
public class CrossHsIslandNpcActionTask extends GeneralTask {

    private CrossHsIslandActivity activity;

    private int total;

    private int taskIndex;

    public CrossHsIslandNpcActionTask(CrossHsIslandActivity crossHsIslandActivity, int total, int taskIndex) {
        this.activity = crossHsIslandActivity;
        this.total = total;
        this.taskIndex = taskIndex;
    }

    @Override
    public void doRun() {
        try {
            activity.npcActionTask(total, taskIndex);
        } catch (BusinessException e) {

        }catch (Exception e) {
            getLOGGER().error("npcActionTask error : ", e);
        }
    }
}
